package cn.wyj.feignclient;

import cn.wyj.domain.User;
import cn.wyj.fallbackFactory.UserFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// 指定服务名
@FeignClient(value = "user-server",fallbackFactory = UserFeignClientFallbackFactory.class)
public interface UserFeignServer {

    @GetMapping("/user/{id}")
    User getUserById(@PathVariable("id") Long id);
}
